.class public Lcom/melesta/payment/listeners/NativeListener;
.super Ljava/lang/Object;
.source "NativeListener.java"

# interfaces
.implements Lcom/melesta/payment/interfaces/IListener;


# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    .line 19
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 20
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v0

    .line 21
    .local v0, ea:Lcom/melesta/engine/EngineActivity;
    if-nez v0, :cond_0

    .line 30
    :goto_0
    return-void

    .line 24
    :cond_0
    new-instance v1, Lcom/melesta/payment/listeners/NativeListener$1;

    invoke-direct {v1, p0}, Lcom/melesta/payment/listeners/NativeListener$1;-><init>(Lcom/melesta/payment/listeners/NativeListener;)V

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method private static native Init()V
.end method

.method private native OnCancel(Ljava/lang/String;)V
.end method

.method private native OnError(Ljava/lang/String;ILjava/lang/String;)V
.end method

.method private native OnPurchase(Ljava/lang/String;IJ)V
.end method

.method private native OnRefund(Ljava/lang/String;)V
.end method

.method private native OnSent(Ljava/lang/String;)V
.end method

.method private native UpdateSkuDetails(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.end method

.method static synthetic access$000()V
    .locals 0

    .prologue
    .line 7
    invoke-static {}, Lcom/melesta/payment/listeners/NativeListener;->Init()V

    return-void
.end method

.method static synthetic access$100(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;IJ)V
    .locals 0
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"
    .parameter "x3"

    .prologue
    .line 7
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/melesta/payment/listeners/NativeListener;->OnPurchase(Ljava/lang/String;IJ)V

    return-void
.end method

.method static synthetic access$200(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;ILjava/lang/String;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"
    .parameter "x2"
    .parameter "x3"

    .prologue
    .line 7
    invoke-direct {p0, p1, p2, p3}, Lcom/melesta/payment/listeners/NativeListener;->OnError(Ljava/lang/String;ILjava/lang/String;)V

    return-void
.end method

.method static synthetic access$300(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 7
    invoke-direct {p0, p1}, Lcom/melesta/payment/listeners/NativeListener;->OnCancel(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$400(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 7
    invoke-direct {p0, p1}, Lcom/melesta/payment/listeners/NativeListener;->OnSent(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$500(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 7
    invoke-direct {p0, p1}, Lcom/melesta/payment/listeners/NativeListener;->OnRefund(Ljava/lang/String;)V

    return-void
.end method


# virtual methods
.method public onCancel(Ljava/lang/String;)V
    .locals 2
    .parameter "name"

    .prologue
    .line 63
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v0

    .line 64
    .local v0, ea:Lcom/melesta/engine/EngineActivity;
    if-nez v0, :cond_0

    .line 72
    :goto_0
    return-void

    .line 66
    :cond_0
    new-instance v1, Lcom/melesta/payment/listeners/NativeListener$4;

    invoke-direct {v1, p0, p1}, Lcom/melesta/payment/listeners/NativeListener$4;-><init>(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public onError(Ljava/lang/String;ILjava/lang/String;)V
    .locals 2
    .parameter "name"
    .parameter "errorCode"
    .parameter "error"

    .prologue
    .line 49
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v0

    .line 50
    .local v0, ea:Lcom/melesta/engine/EngineActivity;
    if-nez v0, :cond_0

    .line 58
    :goto_0
    return-void

    .line 52
    :cond_0
    new-instance v1, Lcom/melesta/payment/listeners/NativeListener$3;

    invoke-direct {v1, p0, p1, p2, p3}, Lcom/melesta/payment/listeners/NativeListener$3;-><init>(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;ILjava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public onPurchase(Ljava/lang/String;IJ)V
    .locals 7
    .parameter "name"
    .parameter "count"
    .parameter "internalId"

    .prologue
    .line 35
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v6

    .line 36
    .local v6, ea:Lcom/melesta/engine/EngineActivity;
    if-nez v6, :cond_0

    .line 44
    :goto_0
    return-void

    .line 38
    :cond_0
    new-instance v0, Lcom/melesta/payment/listeners/NativeListener$2;

    move-object v1, p0

    move-object v2, p1

    move v3, p2

    move-wide v4, p3

    invoke-direct/range {v0 .. v5}, Lcom/melesta/payment/listeners/NativeListener$2;-><init>(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;IJ)V

    invoke-virtual {v6, v0}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public onRefund(Ljava/lang/String;)V
    .locals 2
    .parameter "name"

    .prologue
    .line 92
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v0

    .line 93
    .local v0, ea:Lcom/melesta/engine/EngineActivity;
    if-nez v0, :cond_0

    .line 101
    :goto_0
    return-void

    .line 95
    :cond_0
    new-instance v1, Lcom/melesta/payment/listeners/NativeListener$6;

    invoke-direct {v1, p0, p1}, Lcom/melesta/payment/listeners/NativeListener$6;-><init>(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public onSent(Ljava/lang/String;)V
    .locals 2
    .parameter "name"

    .prologue
    .line 77
    invoke-static {}, Lcom/melesta/engine/EngineActivity;->getInstance()Lcom/melesta/engine/EngineActivity;

    move-result-object v0

    .line 78
    .local v0, ea:Lcom/melesta/engine/EngineActivity;
    if-nez v0, :cond_0

    .line 86
    :goto_0
    return-void

    .line 80
    :cond_0
    new-instance v1, Lcom/melesta/payment/listeners/NativeListener$5;

    invoke-direct {v1, p0, p1}, Lcom/melesta/payment/listeners/NativeListener$5;-><init>(Lcom/melesta/payment/listeners/NativeListener;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineActivity;->runOnGLThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public updateSkuDetails(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter "name"
    .parameter "price"
    .parameter "title"

    .prologue
    .line 106
    invoke-direct {p0, p1, p2, p3}, Lcom/melesta/payment/listeners/NativeListener;->UpdateSkuDetails(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 107
    return-void
.end method
